package com.lagou.sqlsession;

import com.lagou.pojo.Configuration;

/**
 * @ClassName: DefaultSqlSessionFactory
 * @Description:
 * @Author: qiaojiacheng
 * @Date: 2021/7/22 2:30 下午
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }


    @Override
    public SqlSession openSession() {
        DefaultSqlSession defaultSqlSession = new DefaultSqlSession(configuration);
        return defaultSqlSession;
    }
}
